<%@page import="EDU.oswego.cs.dl.util.concurrent.CountDown"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Web Photo Share</title>
        <link rel="stylesheet" href="style.css" type="text/css"/>
        <script type="text/javascript" src="js/jquery-1.5.1.min.js"></script>
        <script>
            
            $(document).ready(function(){
               $("#slcontest").change(function(){
                   var select = $("#slcontest").val();
                   $.ajax({
                            type:"POST",
                            url:"TriController",
                            data:"action=getcontent&id="+select,
                            complete:function(data){
                                $("#txtInfoOfContest").html(data.responseText);
                            }
                        }) ;
               });
            });
        </script>
    </head>
    <body>
        <div id="wrapper">
            <div id="header">

                <h1>Photo Share</h1>
                <img src="header_right.gif" alt="hinh"/>
            </div>
            <div id="nav">
                <ul>
                    <li><a href="index.jsp">Home</a></li>
                    <li><a href="allcollection.jsp">Manage Collection</a></li>
                    <li><a href="allimage">Manage Image</a></li>
                    <li><a href="upload.jsp">Upload</a></li>
                    <li><a href="faq.jsp">FAQs</a></li>
                    <li class="end"><a href="contactus.jsp">Contact</a></li>
                </ul>
            </div>
<div id="main">
    <div id="slidebar">
        <div id="login">
            <jsp:include page="login.jsp"></jsp:include>
        </div>
        <div id="search">
            <jsp:include page="search.jsp"></jsp:include>
        </div>
        <div id="product">
            <jsp:include page="categorypanel.jsp"></jsp:include>
        </div>
    </div>
    <div id="content">
        <h1>Registry Contest</h1>
        <c:set var="show" value="${requestScope.ViewRegistryContest}"/>
        <form id="form1" name="form1" method="post" action="TriController">
            <table width="329" border="0">
                <tr>
                    <td scope="col">Username:<%=session.getAttribute("username")%>
                        <input name="txtUserName" type="hidden" id="txtUserName" value="<%=session.getAttribute("username")%>" />
                    </td>
                </tr>
                <c:set var="count" value="0"/>
                <c:forEach var="drDownList" items="${show}">
                    <c:set var="count" value="${count+1}"/>
                </c:forEach>
                <c:if test="${count > 1}">
                    <select name="" id="slcontest">
                        <c:forEach var="drDownList" items="${show}">
                            <option value="${drDownList.idContest}">${drDownList.nameContest}</option>
                        </c:forEach>
                    </select>
                </c:if>
                <tr>
                    <td><p align="center">Information of Contest:</p>
                        <%--<c:forEach var="show" items="${show}">
                            <c:if test="${not empty show}">
                                <input type="hidden" name="txtIdContest" value="${show.idContest}" />
                                <textarea name="txtInfoOfContest" cols="70" rows="5" id="txtInfoOfContest">${show.contentContest}</textarea>
                            </c:if>
                        </c:forEach> --%>
                        <textarea name="txtInfoOfContest" cols="70" rows="5" id="txtInfoOfContest"></textarea>
                        <p>
                            <input type="checkbox" name="txtCheck" value="True" />
                            I want to join this contest   </p></td>
                </tr>
                <tr>
                    <td><label>
                            <input type="submit" name="action" id="btnAgree" value="I Agree" />
                        </label><label>
                            <input type="submit" name="action" id="btnCancel" value="Cancel" <a href="home.jsp"/>
                        </label></td>
                </tr>
            </table>
        </form>
    </div>
</div>
<div id="footer">

</div>
</div>
</body>
</html>
